#ifndef LINKERITEM_H
#define LINKERITEM_H
#include "EditorWidgets/searchlineedit.h"
#include <QWidget>
#include <GameData/gamedata.h>
#include "Linker/linker.h"
namespace Ui {
class LinkerItem;
}

class LinkerItem : public QWidget
{
    Q_OBJECT

public:
    explicit LinkerItem(QWidget *parent = nullptr,bool isCondition = true);
    ~LinkerItem();
    //提交填写的信息
    Condition* ReadCondition();
    Action* ReadAction();
    //前端填写后端信息
    void WriteCondition(Condition* c);
    void WriteAction(Action* a);
private:
    Ui::LinkerItem *ui;
    SearchLineEdit* search = nullptr;
    void InitCondition();
    void InitAction();
};

#endif // LINKERITEM_H
